package com.eco.fanliapp.admin.controller.web;

import com.eco.fanliapp.admin.annotation.SysLogAnnotation;
import com.eco.fanliapp.common.response.ServerResponse;
import com.eco.fanliapp.entity.AppFeedBack;
import com.eco.fanliapp.service.IAppFeedBackService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/feedback")
public class FeedBackController {

    private static final Logger log = LoggerFactory.getLogger(FeedBackController.class);


    @Autowired
    private IAppFeedBackService appFeedBackService;

    @RequestMapping("/list")
    @ResponseBody
    public ServerResponse selectfeedBackList(String userName, String keyWord , String phone, @RequestParam(defaultValue = "1") int currentPage, @RequestParam(defaultValue = "10") int pageSize) {
        return appFeedBackService.selectfeedBackList(userName,keyWord,phone,currentPage,pageSize);
    }
    @RequestMapping("/manage")
    @ResponseBody
    public ServerResponse opinionManage(@RequestBody AppFeedBack appFeedBack) {
        return appFeedBackService.opinionManage(appFeedBack);
    }


}






